<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>本草纲目网---欢迎您！</title>

    <!-- Bootstrap -->
    <link href="<%=request.getContextPath() %>/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath() %>/static/css/bootstrap-theme.min.css" rel="stylesheet">
    <link href="<%=request.getContextPath() %>/static/css/jumbotron.css" rel="stylesheet">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="<%=request.getContextPath() %>/static/js/html5shiv.min.js"></script>
      <script src="<%=request.getContextPath() %>/static/js/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="<%=request.getContextPath()%>/">本草纲目网</a>
        </div>
        
        <c:if test="${user eq null }">
        <div id="navbar" class="navbar-collapse collapse">
          <form class="navbar-form navbar-right" method="post" action="<%=request.getContextPath()%>/Account/Login">
            <input type="hidden" name="action" value="login" />
            <div class="form-group">
              <input type="text" placeholder="账户" name="username" class="form-control">
            </div>
            <div class="form-group">
              <input type="password" placeholder="密码" name="password" class="form-control">
            </div>
            <button type="submit" class="btn btn-success">立即登陆</button>
            <a class="btn btn-info" href="<%=request.getContextPath() %>/Account/Register">马上注册</a>
          </form>
        </div><!--/.navbar-collapse -->
		</c:if>
		<c:if test="${user ne null }">
		<div id="navbar" class="navbar-collapse collapse">
		  <ul class="nav navbar-nav navbar-right">
		    <li><a>欢迎您，<b>${fn:escapeXml(user.realName) }</b>！</a></li>
		    <li><a href="<%=request.getContextPath() %>/Order/ShowMyOrders">我的订单</a></li>
		    <li><a href="<%=request.getContextPath() %>/Cart/ShowMyCart">我的购物车</a></li>
		    <li><a href="<%=request.getContextPath() %>/Account/Logout">注销</a></li>
		  </ul>
  		</div>
		</c:if>

      </div>
    </nav>

    <!-- Main jumbotron for a primary marketing message or call to action -->
    <!-- <div class="jumbotron"> -->
      <div class="container">
        <h1 style="font-family:华文行楷;" >本草纲目<small>网</small> </h1>
 
        <div class="row">
          <div class="col-lg-3 col-sm-2"></div><!--左侧不用-->
          <div class="col-lg-6 col-sm-8 col-xs-12">
            <form method="get" action="<%=request.getContextPath()%>/GoodItem/SearchGoodItem">
             <div class="input-group">
             <input type="text" class="form-control" name="keyword" placeholder="检索药品……" value="${fn:escapeXml(param.keyword) }">
             <span class="input-group-btn">
                  <button class="btn btn-default" type="submit">查询药品</button>
             </span>
             </div><!-- /input-group -->
             </form>
           </div><!-- /.col-sm-4 -->
          <div class="col-lg-3 col-sm-2"></div><!--右侧不用-->

        </div><!-- /.row --> 
            
       <br /><br />
       
       
        <!--导航栏 -->  
        <div class="row">
        <div class="col-lg-2">
        </div>
       <div class="col-lg-8">
       <nav class="navbar navbar-inverse">
        <ul class="nav nav-tabs">
        <li role="presentation"><a href="#">首页</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E6%84%9F%E5%86%92">感冒</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E8%85%B9%E6%B3%BB">腹泻</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E8%83%83">胃病</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E9%AB%98%E8%A1%80%E5%8E%8B">高血压</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E9%BC%BB%E7%82%8E">鼻炎</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E9%A3%8E%E6%B9%BF">风湿</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E7%9A%AE%E7%82%8E">皮炎</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E5%A4%B1%E7%9C%A0">失眠</a></li>
        <li role="presentation"><a href="<%=request.getContextPath() %>/GoodItem/SearchGoodItem?keyword=%E7%B3%96%E5%B0%BF%E7%97%85">糖尿病</a></li>
        </ul>
      </nav>
      </div>
      <div class="col-lg-2">
       </div>
      </div>
       
       
 <!--滚动图片开始-->
 <div class="row">
 <div class="col-md-3 col-lg-3">
 
 <div class="list-group">
  <a href="#" class="list-group-item active ">销量排行榜</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=1" class="list-group-item">No.1 感冒灵胶囊</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=8" class="list-group-item">No.2 藿香正气水</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=18" class="list-group-item">No.3 牛黄降压丸</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=23" class="list-group-item">No.4 格列美脲片</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=25" class="list-group-item">No.5 胃康灵胶囊</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=43" class="list-group-item">No.5 消炎镇痛膏</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=54" class="list-group-item">No.6 百乐眠胶囊</a>
  <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=57" class="list-group-item">No.7 天王补心丸</a>
</div>

 </div>
 <div class="col-md-6 col-lg-6">
  <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
    <li data-target="#carousel-example-generic" data-slide-to="3"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=1"><img src="<%=request.getContextPath() %>/static/image/CTM-1.jpg" alt=""></a>
      <div class="carousel-caption">
        ...
      </div>
    </div>
    
     <div class="item">
      <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=20">
      <img src="<%=request.getContextPath() %>/static/image/CTM-2.jpg" alt=""></a>
      <div class="carousel-caption">
        ...
      </div>
    </div>
    
      <div class="item">
      <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=25">
      <img src="<%=request.getContextPath() %>/static/image/CTM-3.jpg" alt=""></a>
      <div class="carousel-caption">
        ...
      </div>
    </div>
      <div class="item">
      <a href="<%=request.getContextPath() %>/GoodItem/ShowGoodItem?id=42">
      <img src="<%=request.getContextPath() %>/static/image/CTM-4.jpg" alt=""></a>
      <div class="carousel-caption">
        ...
      </div>
    </div>
   
    
  </div>

  <!-- Controls -->
  <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
    <span class="sr-only">前一个</span>
  </a>
  <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
    <span class="sr-only">后一个</span>
  </a>
 </div>
 </div>
 
  <div class="col-md-3 col-lg-3">
  
  <div class="panel panel-default">
  <div class="panel-body"><font face="华文楷体" size="+1">本草纲目网信息发布中心！</font></div>
  <div class="panel-body"><a href="<%=request.getContextPath() %>/Info/ShowInfo">本站重新上线！2016-05-30</a></div>
  <div class="panel-body"><a href="<%=request.getContextPath() %>/Info/ShowInfo">网站维护通知！2016-05-09</a></div>
  <div class="panel-body"><a href="<%=request.getContextPath() %>/Info/ShowInfo">我站四月份销量翻番！2016-05-01</a></div>
  <div class="panel-body"><a href="<%=request.getContextPath() %>/Info/ShowInfo">我站拟定维护计划！    2016-01-01</a></div>
  
  </div>
    
   <a class="btn btn-primary btn-lg" href="<%=request.getContextPath() %>/Cart/ShowMyCart" role="button">我的购物车&raquo;</a>
   <a class="btn btn-info btn-lg" href="<%=request.getContextPath() %>/Order/ShowMyOrders" role="button">我的订单&raquo;</a>
   <c:if test="${admin ne null }">
     <a class="btn btn-danger btn-lg" href="<%=request.getContextPath() %>/Account/AdminLogout" role="button">管理员注销&raquo;</a>
   </c:if>
   <a class="btn btn-success btn-lg" href="<%=request.getContextPath() %>/GoodItem/CreateGoodItem" role="button">添加药品&raquo;</a>
 </div>
 </div>
 <!--滚动图片结束-->
   
   <div style="margin-top:20px;"></div>
 
    <footer style="padding-top:19px;color:#777;border-top:1px solid #e5e5e5">
      <p>&copy; 2016 中国药科大学理学院信息管理与信息系统13480班第3组</p>
    </footer>
</div>
<!-- </div> -->


    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="<%=request.getContextPath() %>/static/js/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="<%=request.getContextPath() %>/static/js/bootstrap.min.js"></script>
  </body>
</html>